﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace PropertyManagement.xinwen
{
    public partial class browerOne : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["pid"] != null)
                {
                    int id = Int16.Parse(Request.QueryString["pid"]);
                    BindData(id);
                }
            }
        }

        public void BindData(int id)
        {
            string strsql = "select * from sxinwen where id=" + id;
            mydata myda = new mydata();
            DataSet ds = myda.getDataSet(strsql, "sxinwen");

            

            DataList1.DataSource = ds.Tables[0].DefaultView;
            DataList1.DataBind();

            GridView1.DataSource = ds.Tables[0];
            GridView1.DataBind();

            DataList2.DataSource = ds.Tables[0].DefaultView;
            DataList2.DataBind();
        }
    }
}